package main.java.products;

import java.io.Serializable;

import org.apache.log4j.Level;

import main.java.feeding.FeedManager;

public class Transaction implements Serializable{
	private long quantity;
	private double prix;
	private String contrepartie;
	private String devise;
	private String productCode;
	private String transactionCode;
	
	
	public Transaction(long quantity, double prix, String contrepartie,
			String devise, String productCode, String transactionCode) {
		this.quantity = quantity;
		this.prix = prix;
		this.contrepartie = contrepartie;
		if (devise.length()==3) {
			this.devise = devise;
		} else { 
			FeedManager.getLogger().log(Level.WARN, "Transcation : devise ne fait pas 3 lettres");
		}
		this.productCode = productCode;
		this.transactionCode = transactionCode;
	}


	public long getQuantity() {
		return quantity;
	}


	public void setQuantity(long quantity) {
		this.quantity = quantity;
	}


	public double getPrix() {
		return prix;
	}


	public void setPrix(double prix) {
		this.prix = prix;
	}


	public String getContrepartie() {
		return contrepartie;
	}


	public void setContrepartie(String contrepartie) {
		this.contrepartie = contrepartie;
	}


	public String getDevise() {
		return devise;
	}


	public void setDevise(String devise) {
		this.devise = devise;
	}


	public String getProductCode() {
		return productCode;
	}


	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}


	public String getTransactionCode() {
		return transactionCode;
	}


	public void setTransactionCode(String transactionCode) {
		this.transactionCode = transactionCode;
	}
}
